TGML Text Flow: <TextBox>

Text defines a graphics element consisting of text. TextBox wraps the text within the specified box. The TextBox element also supports manual line breaks (ASCII character 10).

The text is stored in the CDATA section of the TextBox element.

Attribute Type Description

Content

String

The character data.
Inheritable: No
Animatable: Yes

FontFamily

String

The name of the font or font family.
Inheritable: Yes
Animatable: Yes

FontSize

Double

The size of the font, in device independent pixels. For more information, see the TGML Coordinate System section.
Inheritable: Yes
Animatable: Yes

FontStyle

FontStyle

The style of the font, that is, Normal or Italic.
Default: "Normal"
Inheritable: Yes
Animatable: Yes

FontWeight

FontWeight

The style of the font, that is, Normal or Bold.
Default: "Normal"
Inheritable: Yes
Animatable: Yes

HorizontalAlign

HorizontalAlign

Describes the horizontal alignment of a text string:
Text: Relative to the x coordinate Left
TextBox: Relative to the specified box
Default: "Left"
Inheritable: Yes
Animatable: Yes

Left

Double

The x coordinate of the upper left corner of the text area.
Default: "0"
Inheritable: No
Animatable: Yes

Opacity

Double

A value between "0.0" (transparent) and "1.0" (opaque)
Default: "1.0"
Inheritable: No
Animatable: Yes

Stroke

Brush

Describes how the line is painted.
Default:"#000000"
Inheritable: Yes
Animatable: Yes

TextDecoration

TextDecoration

Specifies decorations that are added to the text.
Default: "None"
Inheritable: Yes
Animatable: Yes

Top

Double

The y coordinate of the upper left corner of the text area.
Default: "0"
Inheritable: No
Animatable: Yes

VerticalAlign

VerticalAlign

Describes the vertical alignment of a text string:
Text: Relative to the x coordinate Left
TextBox: Relative to the specified box
Default: "Top"
Inheritable: Yes
Animatable: Yes

Visibility

Visibility

Specifies if the text is visible or not.
Default: "Visible"
Inheritable: No
Animatable: Yes

Height

Double

The height of the text area.
Inheritable: No
Animatable: Yes

Width

Double

The width of the text area.
Inheritable: No
Animatable: Yes

Example:

Copy
<TextBox Left="50" Top="50 Width="200" Height="200">
<![CDATA [This is 
three lines 
of text]]>
</TextBox>

Example on screen: